using dxl scripting how to edit the stypr type attribute text. |
Re: Editing String type attribute Using DXL scripting how to edit the string type attribute text. More detail : I have a columns "regression", "build", "result", "evidance" and "result comment" where as "regression", "build" and "result" are enumerated type and "evidance" and "result comment" are string type. I need a script to clear the contents of the columns "result", "evidance" and "result comment" for those "build" column value is = 100. Attachments attachment_14679570_detail.JPG |
Re: Editing String type attribute sireeshap - Tue Sep 06 02:46:37 EDT 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Editing String type attribute Mathias Mamsch - Tue Sep 06 03:42:12 EDT 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS Thank you very much for immediate responce. presetly I am doing that manually. while performing regression execution, if the test cases are more , i have to spend more time for that. so we are looking script for that. Could you please guide me in that. Regards, Sireesha |
Re: Editing String type attribute sireeshap - Tue Sep 06 03:53:59 EDT 2011
I do not see how more test cases will increase the time, since the procedure I described will do that for ALL objects in the current view in one click. Anyway the code would look something like this (try this in a test environment first, i did not test the code):
Object o
if (!confirm "This script will delete stuff from your module, are you sure??") halt
for o in entire current Module do {
// ignore deleted objects, table cells, table rows or table heads
if (isDeleted o || cell o || table o || row o) continue
if (o."build" "" == "100") {
o."result" = ""
o."evidence" = ""
o."result comment" = ""
}
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Editing String type attribute Mathias Mamsch - Tue Sep 06 06:24:31 EDT 2011
I do not see how more test cases will increase the time, since the procedure I described will do that for ALL objects in the current view in one click. Anyway the code would look something like this (try this in a test environment first, i did not test the code):
Object o
if (!confirm "This script will delete stuff from your module, are you sure??") halt
for o in entire current Module do {
// ignore deleted objects, table cells, table rows or table heads
if (isDeleted o || cell o || table o || row o) continue
if (o."build" "" == "100") {
o."result" = ""
o."evidence" = ""
o."result comment" = ""
}
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
This code is not working. after entering into last if loop it's throughing" DXL halted with run tume error". could you please look this again. |
Re: Editing String type attribute sireeshap - Wed Sep 07 02:26:27 EDT 2011 I think it is dangarous applying DXL without a little knowledge of the workings. Did you respect the following points:
-R-E- DXL: <Line:7> unknown Object attribute (build) -I- DXL: execution halted
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Editing String type attribute Mathias Mamsch - Wed Sep 07 04:05:31 EDT 2011 I think it is dangarous applying DXL without a little knowledge of the workings. Did you respect the following points:
-R-E- DXL: <Line:7> unknown Object attribute (build) -I- DXL: execution halted
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Thanks alot. Finally my script is working with your guidance. Object o if (!confirm "This script will delete stuff from your module, are you sure??") halt for o in entire current Module do { // ignore deleted objects, table cells, table rows or table heads if (isSelected o || cell o || table o || row o) continue if (o."Build" "" == "10"){ if (isSelected o || cell o || table o || row o) continue o."Regression" = "No" o."TestEvidance" = "" } } Thank you very much. regards, sireesha. P |
Re: Editing String type attribute sireeshap - Wed Sep 07 05:44:38 EDT 2011 Perhaps you intend "if (! isSelected o ..." Perhaps you intend "isDeleted o" instead of "isSelected o". You don't need the 2nd continue line as you've already bypassed those objects.
I'd be tempted to add a counter of modified objects and display that at the end. infoBox("Regression and Evidence erased for " CountObjs " build-10 objects") |